package org.example.commend.t1;

import java.util.Objects;
import java.util.function.Consumer;

public class Node<T> {

    public Node<?> next;

    Consumer<T> consumer;

    public Node(Consumer<T> consumer,Node<?> next) {
        this.next = next;
        this.consumer = consumer;
    }


    public void accept(T s){
        consumer.accept(s);
    }
}
